﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Algobox.Objects.Finance
{
    public static class Exchanges
    {
        /// <summary>
        /// Returns the exchange MIC for a given market MIC if it exists
        /// </summary>
        /// <param name="market"></param>
        /// <returns></returns>
        public static bool TryGetExchangeMIC(Markets.MarketMIC market, out ExchangeMIC exchange)
        {
            return Enum.TryParse<ExchangeMIC>(market.ToString(), out exchange);
        }


        public enum Destinations
        {
            BATE,
            BATE_CYCLE,
            CHIX,
            XLON
        }


        /// <summary>
        /// Trading Venues or MTFs
        /// </summary>
        public enum ExchangeMIC
        {
            /// <summary>
            /// Default Exchange (Unknown)
            /// </summary>
            XXXX,
            /// <summary>
            /// NYSE Arca
            /// </summary>
            ARCX,
            /// <summary>
            /// Bats Europe
            /// </summary>
            BATE,
            /// <summary>
            /// Bats US
            /// </summary>
            BATS,
            /// <summary>
            /// Chi-X Europe
            /// </summary>
            CHIX,
            /// <summary>
            /// Direct Edge A
            /// </summary>
            EDGA,
            /// <summary>
            /// Direct Edge X
            /// </summary>
            EDGX,
            /// <summary>
            /// Italy MTA Derivatives
            /// </summary>
            MTAA,
            /// <summary>
            /// Nasdaq OMX Europe
            /// </summary>
            NOME,
            /// <summary>
            /// Turquoise Europe
            /// </summary>
            TRQX,
            /// <summary>
            /// Euronext Amsterdam
            /// </summary>
            XAMS,
            /// <summary>
            /// NYSE Amex
            /// </summary>
            XASE,
            /// <summary>
            /// Euronext Brussels
            /// </summary>
            XBRU,
            /// <summary>
            /// Xetra
            /// </summary>
            XETR,
            /// <summary>
            /// Eurex
            /// </summary>
            XEUR,
            /// <summary>
            /// Frankfurt
            /// </summary>
            XFRA,
            /// <summary>
            /// Liffe
            /// </summary>
            XLIF,
            /// <summary>
            /// Euronext Lisbon
            /// </summary>
            XLIS,
            /// <summary>
            /// London Stock Exchange
            /// </summary>
            XLON,
            /// <summary>
            /// Euronext Luxumberg
            /// </summary>
            XLUX,
            /// <summary>
            /// Milan Stock Exchange
            /// </summary>
            XMIL,
            /// <summary>
            /// Nasdaq US
            /// </summary>
            XNAS,
            /// <summary>
            /// New York Stock Exchange
            /// </summary>
            XNYS,
            /// <summary>
            /// Euronext Paris
            /// </summary>
            XPAR,
            /// <summary>
            /// Swiss Exchange
            /// </summary>
            XSWX            
        }

    }
}
